<section class="container">
  <%= render BlockScoutWeb.AddressView, "overview.html", assigns %>

  <section data-page="address-internal-transactions">
    <div class="card">
      <%= render BlockScoutWeb.AddressView, "_tabs.html", assigns %>
      <div class="card-body" data-async-load data-async-listing="<%= @current_path %>">
        <div data-selector="channel-batching-message" style="display: none;">
          <div data-selector="reload-button" class="alert alert-info">
            <a href="#" class="alert-link"><span data-selector="channel-batching-count"></span> <%= gettext "More internal transactions have come in" %></a>
          </div>
        </div>
        <div data-selector="channel-disconnected-message" style="display: none;">
          <div data-selector="reload-button" class="alert alert-danger">
            <a href="#" class="alert-link"><%= gettext "Connection Lost, click to load newer internal transactions" %></a>
          </div>
        </div>
        <div class="clearfix">
          <h2 class="card-title float-left"><%= gettext "Internal Transactions" %></h2>
          <div class="dropdown float-right u-push-sm">
            <button data-test="filter_dropdown" class="btn-dropdown-line dropdown-toggle" type="button"
              id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              Filter: <%= format_current_filter(@filter) %>
            </button>
            <div class="dropdown-menu dropdown-menu-right filter" aria-labelledby="dropdownMenu2">
              <%= link(
                gettext("All"),
                to: address_internal_transaction_path(@conn, :index, @address.hash),
                class: "address__link address__link--active dropdown-item",
                "data-test": "filter_option"
              ) %>
              <%= link(
                gettext("To"),
                to: address_internal_transaction_path(
                  @conn,
                  :index,
                  @address.hash,
                  filter: "to"
                ),
                class: "address__link address__link--active dropdown-item",
                "data-test": "filter_option"
              ) %>
              <%= link(
                gettext("From"),
                to: address_internal_transaction_path(
                  @conn,
                  :index,
                  @address.hash,
                  filter: "from"
                ),
                class: "address__link address__link--active dropdown-item",
                "data-test": "filter_option"
              ) %>
            </div>
          </div>
        </div>

        <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "top", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %>

        <button data-error-message class="alert alert-danger col-12 text-left" style="display: none;">
          <span href="#" class="alert-link"><%= gettext("Something went wrong, click to reload.") %></span>
        </button>
        <div data-empty-response-message style="display: none;">
          <div class="tile tile-muted text-center">
            <span data-selector="empty-internal-transactions-list"><%= gettext "There are no internal transactions for this address." %></span>
          </div>
        </div>

        <div data-items>
          <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %>
        </div>

        <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %>

      </div>
    </div>
  </section>
</section>
